class Link < ActiveRecord::Base

    #vote up the link
    def upvote
        self.up_votes += 1        
        self.total_votes += 1
    end

    #vote down the link
    def downvote        
        self.down_votes += 1
        self.total_votes -= 1
    end

end
